package com.bw.goods.mvvm.adapter;

import android.view.View;
import android.widget.ImageView;

import com.bw.goods.R;
import com.bw.goods.mvvm.model.entity.CategoryValueEntity;
import com.bw.goods.mvvm.model.entity.ChanagEntity;
import com.bw.mvvm_common.network.load.LoadImage;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

/**
 * @author KK
 * @description:
 * @date :2021/10/17 18:25
 *
 */
public class CategoryGoodsAdapter extends BaseQuickAdapter<CategoryValueEntity.DataBean, BaseViewHolder> {

    public CategoryGoodsAdapter() {
        super(R.layout.item_chage_goods);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, CategoryValueEntity.DataBean dataBean) {
        baseViewHolder.setText(R.id.item_chage_tv,dataBean.category_name);
        ImageView im = baseViewHolder.findView(R.id.item_chage_im);
        LoadImage.loadMatchImg(dataBean.category_icon,im);
    }
}
